With the proliferation of digital cameras, numerous online photosharing services have emerged and are becoming widely accepted by photo enthusiasts. The photosharing services are generally based on one of two architectures. The first is a serving architecture where a central server hosts digital images for a number of users and provides photosharing services by serving the digital images to a web browser of a user or guest. The second is a peer-to-peer (P2P) architecture, where a user creates and stores photo albums on the user's computer. The user's computer then operates as a web server to provide the photo albums to the web browser of another user or guest.
For various reasons, many P2P systems now employ a hybrid P2P architecture wherein a proxy server operates as a single point of entry for all of the peer nodes in the P2P system. Thus, when a guest node or another peer node requests a digital image from a peer node, the request is first provided to the proxy server, which in turn provides the request to the peer node. In a similar fashion, the response from the peer node is typically routed through the proxy server.
In order to more quickly respond to requests from guest nodes, a cache that stores recently requested objects such as digital images may be implemented in the proxy server. As a result, subsequent requests for a digital image stored in the cache may be served directly from the proxy server rather than from a peer node. However, one issue with caching proxy servers is that the cache has limited storage space and must therefore be managed. More specifically, when the cache becomes full, the proxy server must remove objects from the cache before caching newly requested objects.
In order to manage the cache, typical caching proxy servers use algorithms such as Least Recently Used (LRU), Largest File First (LFF), Least Frequently Used (LFU), and Greedy Dual-Size algorithms. However, these algorithms fail to accurately cache objects such as digital images based on the actual content of the object. For example, if a digital image stored in cache is a picture of a person snowboarding, typical caching algorithms only consider the number or frequency of requests for the digital image. They do not consider a number or frequency of requests for digital images or other objects related to snowboarding or the person who is snowboarding. As such, there is a need for an improved caching proxy server.